package com.horoscope.astrology.zodiac.signs.free.bean

class UserBean : BaseBean() {
    var name = ""
    var gender = ""
    var birthday = ""
    var bornPlace = ""
    var marial_status = ""
    var constellationName = ""
    var bornTime = ""
    var number1 = "0"
    var number2 = "0"
    var number3 = "0"
    var number4 = "0"
    var cityInfo = CityInfo()
    var gradeStatus = false


    override fun hashCode(): Int {
        var result = name.hashCode()
        result = 31 * result + gender.hashCode()
        result = 31 * result + birthday.hashCode()
        result = 31 * result + bornPlace.hashCode()
        result = 31 * result + marial_status.hashCode()
        result = 31 * result + constellationName.hashCode()
        return result
    }

    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false

        other as UserBean

        if (name != other.name) return false
        if (gender != other.gender) return false
        if (birthday != other.birthday) return false
        if (bornPlace != other.bornPlace) return false
        if (marial_status != other.marial_status) return false
        if (constellationName != other.constellationName) return false
        if (bornTime != other.bornTime && bornTime.isNotEmpty() && other.bornTime.isNotEmpty()) return false
        //if (cityInfo != other.cityInfo) return false
        if (number1 != other.number1) return false
        if (number2 != other.number2) return false
        if (number3 != other.number3) return false
        if (number4 != other.number4) return false

        return true
    }

    override fun toString(): String {
        return "UserBean(name='$name', gender='$gender', birthday='$birthday', bornPlace='$bornPlace', marial_status='$marial_status', constellationName='$constellationName', number1=$number1, number2=$number2, number3=$number3, number4=$number4)"
    }
}